﻿::Изменить значение SetParameters на нужное. Должен быть установлен webdeploy v3.0
::На удаленном IIS должно быть 
set SetParametersFile=WebApplication.SetParameters.xml
set RemoteServerName=localhost
set Admin=alborozd\Alexander
set Password=alex/1991
 
if "%MSDeployPath%" == "" (
for /F "usebackq tokens=1,2,*" %%h  in (`reg query "HKLM\SOFTWARE\Microsoft\IIS Extensions\MSDeploy" /s  ^| findstr -i "InstallPath"`) do (
if /I "%%h" == "InstallPath" ( 
if /I "%%i" == "REG_SZ" ( 
if not "%%j" == "" ( 
if "%%~dpj" == "%%j" ( 
set MSDeployPath=%%j
))))))

echo %MSDeployPath%
 

"%MSDeployPath%msdeploy.exe" ^
	-source:package="C:\Users\Alexander\Documents\Visual Studio 2012\Projects\Diplom_Deploy\WebApplication\obj\WebApplication.zip" ^
	-dest:auto,IncludeAcls='True',AuthType='NTLM',computerName=%RemoteServerName%,userName=%Admin%,password=%Password% ^
	-verb:sync ^
	-setParamFile:"%SetParametersFile%"
	-allowUntrusted ^
	
